﻿package Game.LogicSystem {
	import Game.Manager;
	import Game.LogicSystem.Objects.ObjectClass;
	import Game.LogicSystem.Actions.*;
	public class ActionManager extends Manager {
		
		// Constants:
		// Public Properties:
		// Private Properties:
		public var m_DisplayManager:*;
		private var m_ObjectsActions:Array;
		
		private var baseActionCollection:BaseActionCollection;
		public var BatActions:BatActionsCollection;
	
		// Initialization:
		public function ActionManager(_parentObj:*,_displayManager:*) {
			super(_parentObj);
			m_DisplayManager = _displayManager;
			m_ObjectsActions = new Array();
			BatActions= new BatActionsCollection(this);
			baseActionCollection= new BaseActionCollection(this);
		}
		public function askForActions(_cible:ObjectClass):void{
			var actionList:Array = baseActionCollection.makeActionListFor(_cible);
			var resultArray:Array = new Array(_cible,actionList[1]);
			
			m_ObjectsActions.push(resultArray);
			m_DisplayManager.callInterface(actionList[0],resultArray);
			
		}
		public function isCurrentPlayer():Boolean{
			return Parent.m_PlayM.isCurrentPlayer();
		}
	
		// Public Methods:
		// Protected Methods:
	}
	
}